Optimal. Leaf size=166 \[ -\frac{2 \cot ^7(e+f x)}{7 a^2 c^4 f}+\frac{\cot ^5(e+f x)}{5 a^2 c^4 f}-\frac{\cot ^3(e+f x)}{3 a^2 c^4 f}+\frac{\cot (e+f x)}{a^2 c^4 f}-\frac{2 \csc ^7(e+f x)}{7 a^2 c^4 f}+\frac{6 \csc ^5(e+f x)}{5 a^2 c^4 f}-\frac{2 \csc ^3(e+f x)}{a^2 c^4 f}+\frac{2 \csc (e+f x)}{a^2 c^4 f}+\frac{x}{a^2 c^4} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.211247, antiderivative size = 166, normalized size of antiderivative = 1., number of steps used = 13, number of rules used = 8, integrand size = 26, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.308, Rules used = {3904, 3886, 3473, 8, 2606, 194, 2607, 30} \[ -\frac{2 \cot ^7(e+f x)}{7 a^2 c^4 f}+\frac{\cot ^5(e+f x)}{5 a^2 c^4 f}-\frac{\cot ^3(e+f x)}{3 a^2 c^4 f}+\frac{\cot (e+f x)}{a^2 c^4 f}-\frac{2 \csc ^7(e+f x)}{7 a^2 c^4 f}+\frac{6 \csc ^5(e+f x)}{5 a^2 c^4 f}-\frac{2 \csc ^3(e+f x)}{a^2 c^4 f}+\frac{2 \csc (e+f x)}{a^2 c^4 f}+\frac{x}{a^2 c^4} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3904
Rule 3886
Rule 3473
Rule 8
Rule 2606
Rule 194
Rule 2607
Rule 30
Rubi steps
\begin{align*} \int \frac{1}{(a+a \sec (e+f x))^2 (c-c \sec (e+f x))^4} \, dx &=\frac{\int \cot ^8(e+f x) (a+a \sec (e+f x))^2 \, dx}{a^4 c^4}\\ &=\frac{\int \left (a^2 \cot ^8(e+f x)+2 a^2 \cot ^7(e+f x) \csc (e+f x)+a^2 \cot ^6(e+f x) \csc ^2(e+f x)\right ) \, dx}{a^4 c^4}\\ &=\frac{\int \cot ^8(e+f x) \, dx}{a^2 c^4}+\frac{\int \cot ^6(e+f x) \csc ^2(e+f x) \, dx}{a^2 c^4}+\frac{2 \int \cot ^7(e+f x) \csc (e+f x) \, dx}{a^2 c^4}\\ &=-\frac{\cot ^7(e+f x)}{7 a^2 c^4 f}-\frac{\int \cot ^6(e+f x) \, dx}{a^2 c^4}+\frac{\operatorname{Subst}\left (\int x^6 \, dx,x,-\cot (e+f x)\right )}{a^2 c^4 f}-\frac{2 \operatorname{Subst}\left (\int \left (-1+x^2\right )^3 \, dx,x,\csc (e+f x)\right )}{a^2 c^4 f}\\ &=\frac{\cot ^5(e+f x)}{5 a^2 c^4 f}-\frac{2 \cot ^7(e+f x)}{7 a^2 c^4 f}+\frac{\int \cot ^4(e+f x) \, dx}{a^2 c^4}-\frac{2 \operatorname{Subst}\left (\int \left (-1+3 x^2-3 x^4+x^6\right ) \, dx,x,\csc (e+f x)\right )}{a^2 c^4 f}\\ &=-\frac{\cot ^3(e+f x)}{3 a^2 c^4 f}+\frac{\cot ^5(e+f x)}{5 a^2 c^4 f}-\frac{2 \cot ^7(e+f x)}{7 a^2 c^4 f}+\frac{2 \csc (e+f x)}{a^2 c^4 f}-\frac{2 \csc ^3(e+f x)}{a^2 c^4 f}+\frac{6 \csc ^5(e+f x)}{5 a^2 c^4 f}-\frac{2 \csc ^7(e+f x)}{7 a^2 c^4 f}-\frac{\int \cot ^2(e+f x) \, dx}{a^2 c^4}\\ &=\frac{\cot (e+f x)}{a^2 c^4 f}-\frac{\cot ^3(e+f x)}{3 a^2 c^4 f}+\frac{\cot ^5(e+f x)}{5 a^2 c^4 f}-\frac{2 \cot ^7(e+f x)}{7 a^2 c^4 f}+\frac{2 \csc (e+f x)}{a^2 c^4 f}-\frac{2 \csc ^3(e+f x)}{a^2 c^4 f}+\frac{6 \csc ^5(e+f x)}{5 a^2 c^4 f}-\frac{2 \csc ^7(e+f x)}{7 a^2 c^4 f}+\frac{\int 1 \, dx}{a^2 c^4}\\ &=\frac{x}{a^2 c^4}+\frac{\cot (e+f x)}{a^2 c^4 f}-\frac{\cot ^3(e+f x)}{3 a^2 c^4 f}+\frac{\cot ^5(e+f x)}{5 a^2 c^4 f}-\frac{2 \cot ^7(e+f x)}{7 a^2 c^4 f}+\frac{2 \csc (e+f x)}{a^2 c^4 f}-\frac{2 \csc ^3(e+f x)}{a^2 c^4 f}+\frac{6 \csc ^5(e+f x)}{5 a^2 c^4 f}-\frac{2 \csc ^7(e+f x)}{7 a^2 c^4 f}\\ \end{align*}
Mathematica [A] time = 1.2566, size = 315, normalized size = 1.9 \[ \frac{\csc \left (\frac{e}{2}\right ) \sec \left (\frac{e}{2}\right ) \csc ^7\left (\frac{1}{2} (e+f x)\right ) \sec ^3\left (\frac{1}{2} (e+f x)\right ) (-16002 \sin (e+f x)+9144 \sin (2 (e+f x))+3429 \sin (3 (e+f x))-4572 \sin (4 (e+f x))+1143 \sin (5 (e+f x))-11760 \sin (2 e+f x)+8864 \sin (e+2 f x)+3360 \sin (3 e+2 f x)+2064 \sin (2 e+3 f x)+2520 \sin (4 e+3 f x)-4432 \sin (3 e+4 f x)-1680 \sin (5 e+4 f x)+1528 \sin (4 e+5 f x)-5880 f x \cos (2 e+f x)-3360 f x \cos (e+2 f x)+3360 f x \cos (3 e+2 f x)-1260 f x \cos (2 e+3 f x)+1260 f x \cos (4 e+3 f x)+1680 f x \cos (3 e+4 f x)-1680 f x \cos (5 e+4 f x)-420 f x \cos (4 e+5 f x)+420 f x \cos (6 e+5 f x)+4032 \sin (e)-9632 \sin (f x)+5880 f x \cos (f x))}{860160 a^2 c^4 f} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.071, size = 153, normalized size = 0.9 \begin{align*}{\frac{1}{96\,f{a}^{2}{c}^{4}} \left ( \tan \left ({\frac{fx}{2}}+{\frac{e}{2}} \right ) \right ) ^{3}}-{\frac{7}{32\,f{a}^{2}{c}^{4}}\tan \left ({\frac{fx}{2}}+{\frac{e}{2}} \right ) }+2\,{\frac{\arctan \left ( \tan \left ( 1/2\,fx+e/2 \right ) \right ) }{f{a}^{2}{c}^{4}}}-{\frac{1}{224\,f{a}^{2}{c}^{4}} \left ( \tan \left ({\frac{fx}{2}}+{\frac{e}{2}} \right ) \right ) ^{-7}}+{\frac{7}{160\,f{a}^{2}{c}^{4}} \left ( \tan \left ({\frac{fx}{2}}+{\frac{e}{2}} \right ) \right ) ^{-5}}-{\frac{11}{48\,f{a}^{2}{c}^{4}} \left ( \tan \left ({\frac{fx}{2}}+{\frac{e}{2}} \right ) \right ) ^{-3}}+{\frac{21}{16\,f{a}^{2}{c}^{4}} \left ( \tan \left ({\frac{fx}{2}}+{\frac{e}{2}} \right ) \right ) ^{-1}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.52891, size = 225, normalized size = 1.36 \begin{align*} -\frac{\frac{35 \,{\left (\frac{21 \, \sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} - \frac{\sin \left (f x + e\right )^{3}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{3}}\right )}}{a^{2} c^{4}} - \frac{6720 \, \arctan \left (\frac{\sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1}\right )}{a^{2} c^{4}} - \frac{{\left (\frac{147 \, \sin \left (f x + e\right )^{2}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{2}} - \frac{770 \, \sin \left (f x + e\right )^{4}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{4}} + \frac{4410 \, \sin \left (f x + e\right )^{6}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{6}} - 15\right )}{\left (\cos \left (f x + e\right ) + 1\right )}^{7}}{a^{2} c^{4} \sin \left (f x + e\right )^{7}}}{3360 \, f} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.08481, size = 424, normalized size = 2.55 \begin{align*} \frac{191 \, \cos \left (f x + e\right )^{5} - 172 \, \cos \left (f x + e\right )^{4} - 253 \, \cos \left (f x + e\right )^{3} + 258 \, \cos \left (f x + e\right )^{2} + 105 \,{\left (f x \cos \left (f x + e\right )^{4} - 2 \, f x \cos \left (f x + e\right )^{3} + 2 \, f x \cos \left (f x + e\right ) - f x\right )} \sin \left (f x + e\right ) + 87 \, \cos \left (f x + e\right ) - 96}{105 \,{\left (a^{2} c^{4} f \cos \left (f x + e\right )^{4} - 2 \, a^{2} c^{4} f \cos \left (f x + e\right )^{3} + 2 \, a^{2} c^{4} f \cos \left (f x + e\right ) - a^{2} c^{4} f\right )} \sin \left (f x + e\right )} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \frac{\int \frac{1}{\sec ^{6}{\left (e + f x \right )} - 2 \sec ^{5}{\left (e + f x \right )} - \sec ^{4}{\left (e + f x \right )} + 4 \sec ^{3}{\left (e + f x \right )} - \sec ^{2}{\left (e + f x \right )} - 2 \sec{\left (e + f x \right )} + 1}\, dx}{a^{2} c^{4}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.43285, size = 174, normalized size = 1.05 \begin{align*} \frac{\frac{3360 \,{\left (f x + e\right )}}{a^{2} c^{4}} + \frac{4410 \, \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )^{6} - 770 \, \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )^{4} + 147 \, \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )^{2} - 15}{a^{2} c^{4} \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )^{7}} + \frac{35 \,{\left (a^{4} c^{8} \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )^{3} - 21 \, a^{4} c^{8} \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )\right )}}{a^{6} c^{12}}}{3360 \, f} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]